package com.yugao.fintech.antelope.pay.common.model.mq;

import com.yugao.fintech.antelope.base.model.module.mq.AbstractMQ;
import com.yugao.fintech.antelope.base.model.module.mq.BaseMqPayload;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 支付订单补单（一般用于没有回调的接口，比如微信的条码支付）
 *

 */
public class PayOrderReissueMQ extends AbstractMQ {
    /**
     * 延迟队列, 不能被消费监听
     */
    public static final String QUEUE = "pay_service.order_reissue.queue";

    /**
     * 进入到延迟队列的routingKey
     */
    public static final String KEY = "pay_service.order_reissue.delay.key";

    public PayOrderReissueMQ(MsgPayload msgPayload) {
        super(msgPayload);
    }

    private MsgPayload payload;

    @Data
    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    public static class MsgPayload extends BaseMqPayload {

        /** 支付订单号 **/
        private String payOrderNo;

        /** 通知次数 **/
        private Integer count;
    }

    public static PayOrderReissueMQ build(String payOrderNo, Integer count){
        return new PayOrderReissueMQ(new MsgPayload(payOrderNo, count));
    }
}
